import request from '../utils/request'

//登陆
export function login(data) {
    return request({
        url: 'fras/sys/login',
        method: 'post',
        data
    })
}

//拉起用户列表
export function getUserList(data) {
    return request({
        url: `fras/sys/user/list?page=${data.page}&limit=${data.limit}`,
        method: 'get',
    })
}




//拉取用户信息
// url:/pms/user/info
export function getUserInfo(data) {
    return request({
        url: '/fras/sys/user/info',
        method: 'get',
        data
    })
}
//设置邮箱
//param {"email": 80018520@qq.com}
export function setUserEmail(data) {
    return request({
        url: '/pms/user/updateEmail',
        method: 'post',
        data
    })
}
//拉取打卡信息
//http://localhost:8888/pms/usersignlog/list?page=1&limit=10
export function getUserSignLog(data) {
    return request({
        url: `/pms/usersignlog/list?page=${data.page}&imit=${data.limit}`,
        method: 'get',
    })
}


//退出登陆
///logout
export function logout() {
    return request({
        url: 'fras/sys/logout',
        method: 'post',
    })
}

//修改密码

export function setPassword(data) {
    return request({
        url: 'fras/sys/user/password',
        method: 'post',
        data
    })
}

//拉取用户权限及菜单

export function getMenuAndPermissions() {
    return request({
        url: 'fras/sys/menu/nav',
        method: 'get',
    })
}
